Hardware Solution of a First-Order Diophantine Equation
نویسندگان
چکیده
In this paper we present the theoretical framework for enumerating the solutions of the Diophantine equation (1) that helps us define the sets of points, of a nested loop, that can be executed in parallel. The analytical expression for finding those points is given below: + + + = 1 2 ... n i i i c (1) where i1, i2,..., in, ≤ ≤ ∀ = 0 , 1 ... p p i L p n are the loop indices, Lp is the loop bound and c defines the time all points satisfying this equation will be executed in parallel. Moreover, we present an innovative “refined” algorithm which speeds up the generation of those solutions compared to the traditional ‘brute-force” approach. Finally, we present a modular hardware implementation of this “refined” algorithm on FPGA platforms, an approach which increases even more the algorithm’s performance. The presented architecture and theoretical solution is suitable in load balancing applications, consisting of nested for-loops with dependencies, since it allows rapid and dynamic generation (in hardware) of the index points of loop instances that can be executed in parallel and can be easily reconfigured. Both the theoretical framework and the algorithmic solution are used for the enumeration and generation of the index values of loop instances to be executed in parallel (the “Point Generator” module in Fig.1) in a load balancing application which is a part of a more general project that proposes a Flexible General-Purpose Parallelizing Architecture for Nested Loops in Reconfigurable Platforms. The general architecture of the proposed design is illustrated in Fig.1 . Figure 1 The system’s architecture The critical module of the architecture presented in Fig.1 is the “Point Generator” component which generates the solutions of Equation (1). To preserve the generality through modularity 1 This work is co funded by the European Social Fund (75%) and National Resources (25%) Operational Program for Educational and Vocational Training II (EPEAEK II) and particularly the Program PYTHAGORAS II. of the approach, the “Point Generator” is implemented in hardware as a line of smaller interconnected modules defined as I-modules as shown in Fig.2. This implementation falls into the category of dynamic generation of index points of loop instances that can be executed in parallel as opposed to the static generation of those points. Static generation entails the computation of such points at design time and its storage in a memory and as a consequence consumes a greater amount of resources. To the extent of the authors’ knowledge, the implementation presented for the dynamic generation of those points (i.e. dynamic scheduling algorithms of nested loops with dependences) in hardware is innovative. Equation (1) is a first-order Diophantine equation with unitary coefficients. The problem for finding and enumerating its solutions is formulated as follows: Find all vectors 1 2 ( , ,..., ), ,0 , 1.. n p p p i i i i N i L p n ∈ ≤ ≤ ∀ = that are solutions to the equation + + + = 1 2 ... n i i i c We define the function fc(D) as the function that returns the desired result for a given c, D (where c is defined above and D is the depth of the nested loops, equals to n) and we prove that it is: 1 1
منابع مشابه
On the Diophantine Equation x^6+ky^3=z^6+kw^3
Given the positive integers m,n, solving the well known symmetric Diophantine equation xm+kyn=zm+kwn, where k is a rational number, is a challenge. By computer calculations, we show that for all integers k from 1 to 500, the Diophantine equation x6+ky3=z6+kw3 has infinitely many nontrivial (y≠w) rational solutions. Clearly, the same result holds for positive integers k whose cube-free part is n...
متن کاملOn Fuzzy Solution for Exact Second Order Fuzzy Differential Equation
In the present paper, the analytical solution for an exact second order fuzzy initial value problem under generalized Hukuhara differentiability is obtained. First the solution of first order linear fuzzy differential equation under generalized Hukuhara differentiability is investigated using integration factor methods in two cases. The second based on the type of generalized Hukuhara different...
متن کاملGeneral Solution for Fuzzy Linear Second Order Differential Equation Using First Solution
The fuzzy linear second order equations with fuzzy initial values are investigatedin this paper. The analytic general solution solutions of them usinga rst solution is founded. The parametric form of fuzzy numbers is appliedto solve the second order equations. General solutions for fuzzy linear secondorder equations with fuzzy initial values are investigated and formulatedin four cases. A examp...
متن کاملDiophantine Equations Related with Linear Binary Recurrences
In this paper we find all solutions of four kinds of the Diophantine equations begin{equation*} ~x^{2}pm V_{t}xy-y^{2}pm x=0text{ and}~x^{2}pm V_{t}xy-y^{2}pm y=0, end{equation*}% for an odd number $t$, and, begin{equation*} ~x^{2}pm V_{t}xy+y^{2}-x=0text{ and}text{ }x^{2}pm V_{t}xy+y^{2}-y=0, end{equation*}% for an even number $t$, where $V_{n}$ is a generalized Lucas number. This pape...
متن کاملHow to Solve a Diophantine Equation
These notes represent an extended version of a talk I gave for the participants of the IMO 2009 and other interested people. We introduce diophantine equations and show evidence that it can be hard to solve them. Then we demonstrate how one can solve a specific equation related to numbers occurring several times in Pascal’s Triangle with state-of-the-art methods. 1. Diophantine Equations The to...
متن کامل